package com.example.hello.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.Map;

@Controller
public class IndexController {
    @RequestMapping("/index")
    public String index(Map<String,Object> map){
        map.put("name","xiangzi");
        map.put("sex","0");
        map.put("age",20);
        ArrayList<Object> userList=new ArrayList<>();
        userList.add("wang");
        userList.add("hua");
        map.put("userList",userList);
        return "index";
    }
    public String user2(){
        return "aa";
    }
}
